from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
import models
# Register your models here.


class HostAdmin(admin.ModelAdmin):
    search_fields = ('hostname', 'ip_addr')


class UserProfileAdmin(admin.ModelAdmin):
    list_display = ('user', 'name', 'department', 'vaild_begin_time', 'vaild_end_time')
    filter_horizontal = ('host_group', 'bind_hosts', 'game')

admin.site.register(models.Hosts)
admin.site.register(models.Department)
admin.site.register(models.Games)
admin.site.register(models.HostGroups)
admin.site.register(models.HostUser)
admin.site.register(models.IDC)
admin.site.register(models.UserProfile, UserProfileAdmin)
admin.site.register(models.BindHosts)
admin.site.register(models.GamePlatform)
admin.site.register(models.GameClusteer)
admin.site.register(models.GameCdnClient)
admin.site.register(models.GameCdnDomain)
